<!DOCTYPE html>
<html xmlns:th="http://www.thymeleaf.org"
      xmlns:layout="http://www.ultraq.net.nz/web/thymeleaf/layout"
      layout:decorate="layout">
<head>
    <title>home</title>
</head>
<body>
<!--<h1 layout:fragment="header">Messages : View all</h1>-->
<div layout:fragment="content">
    <div class="box-header with-border">
        <h3 class="box-title">机构管理</h3>
    </div>
    <!-- /.box-header -->
    <!-- form start -->
    <form class="form-horizontal" role="form">
        <div class="box-body">
            <div class="form-group col-md-3">
                <label for="search_orgNum" class="col-sm-4 control-label">机构代码</label>

                <div class="col-xs-8 no-padding">
                    <input type="hidden" th:name="${_csrf.parameterName}" th:value="${_csrf.token}"/>
                    <input type="text" id="search_orgNum" class="form-control" placeholder="机构代码" name="search_orgNum">
                </div>
            </div>
            <div class="form-group col-md-3">
                <label for="search_orgName" class="col-sm-4 control-label">机构名称</label>

                <div class="col-xs-8 no-padding">
                    <input type="text" id="search_orgName" class="form-control" placeholder="机构名称（模糊查询）" name="search_orgName">
                </div>
            </div>
            <div class="form-group col-md-4 right-button">
                <button onclick="import_org()" type="button" class="btn btn-danger right-button">导入</button>
                <button onclick="output_org()" type="button" class="btn btn-danger right-button">导出</button>
                <button onclick="search_Org()" type="button" class="btn btn-danger right-button">查询</button>
                <button onclick="processOrgMore($(this).val())" value="1" type="button" class="btn btn-danger right-button">批量删除</button>
            </div>
        </div>
    </form>
    <div class="box-body">
        <table id="organization" class="table table-bordered table-striped">
            <thead>
            <tr>
                <th>序号</th>
                <th><input type="checkbox" value="ctrlOrg_box" onclick="ctrlOrg_box()"></th>
                <th>机构代码</th>
                <th>机构名称</th>
                <th>操作</th>
            </tr>
            </thead>
            <tbody></tbody>
        </table>
    </div>
    <div id="org-modal-form" class="modal" tabindex="-1" aria-hidden="true" style="display: none;">
        <div class="modal-dialog">
            <div class="modal-content">
                <div class="modal-header">
                    <button type="button" class="close" data-dismiss="modal">×</button>
                    <h4 class="blue bigger">机构导入</h4>
                </div>
                <form action="../../admin/organization/import" id="orgFileForm" method="post" enctype="multipart/form-data">
                    <div class="modal-body">
                        <fieldset>
                            <div class="form-group">
                                <label class="col-sm-3 control-label no-padding-right">导入文件：</label>
                                <div class="">
                                    <input type="file" id="importOrgFile" name="orgFile"/>
                                </div>
                            </div>
                        </fieldset>
                    </div>
                    <div class="modal-footer">
                        <button type="reset" class="btn btn-sm" data-dismiss="modal">
                            <i class="ace-icon fa fa-times"></i>
                            返回
                        </button>
                        <button type="button" onclick="submitOrgFile()" class="btn btn-sm btn-primary">
                            <i class="ace-icon fa fa-check"></i>
                            提交
                        </button>
                    </div>
                </form>
            </div>
        </div>
    </div>
    <script src="../../static/js/pages/Organization.js"></script>
</div>
</body>
</html>